#ifndef COUTCHUNK_H_
#define COUTCHUNK_H_

#include "cbinarychunk.h"

/**
 * COutChunk - class representing binary file block nad its out operations
 * @author Michal Rost
 * @date 27.10.2007
 */
class COutChunk : public CBinaryChunk {
public:
  COutChunk(unsigned short id);
  COutChunk(const COutChunk &chunk);
  COutChunk& operator = (const COutChunk &chunk);
  unsigned int saveToStream(ostream &fh);
  void writeChunk(const COutChunk &chunk);
  void writeCColor(const CColor &color);
  void writeString(const string &str);
  void writeBool(const bool &val);
  void writeDouble(const double &num);
  void writeFloat(const float &num);
  void writeShort(const short &num);
  void writeChar(const char &num);
  void writeInt(const int &num);
  void writeUShort(const unsigned short &num);
  void writeUChar(const unsigned char &num);
  void writeUInt(const unsigned int &num);
  void writeBuffer(char* buf, unsigned int bufSize);
  static string getClassName() {
    return "COutChunk";
  }
protected:
  void init();
  unsigned int writeChunk(ostream &fh, const COutChunk &chunk);
};

#endif
